package PackageGeometry;

public class Eclipse extends Geometry{
    private double a;
    private double b;

    public Eclipse() {
    }

    public Eclipse(double a, double b) {
        this.a = a;
        this.b = b;
    }

    /**
     * 获取
     * @return a
     */
    public double getA() {
        return a;
    }

    /**
     * 设置
     * @param a
     */
    public void setA(double a) {
        this.a = a;
    }

    /**
     * 获取
     * @return b
     */
    public double getB() {
        return b;
    }

    /**
     * 设置
     * @param b
     */
    public void setB(double b) {
        this.b = b;
    }

    @Override
    public double calculateArea() {
        return PI * (a/2) * (b/2);
    }

    @Override
    public double calculateCircumference() {
        return 2 * PI * b + 4 * (a - b);
    }

    @Override
    public void draw() {
        System.out.println("目前正在画一个椭圆");
    }
}
